-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows utilities easy mode for Knative Injection #1658
Conversation
… to leverage injection without being a controller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n3wscott, vagababov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest wish I could run those tests locally... |
You should be able to /cc @evankanderson |
// Start the injection clients and informers. | ||
logging.FromContext(ctx).Info("Starting informers...") | ||
go func(ctx context.Context) { | ||
if err := controller.StartInformers(ctx.Done(), informers...); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change broke reconcilers that set non-default resyncPeriod values because it starts informers before the controllers are set up. Attempting to set the resyncPeriod is ignored and the informer code logs this warning message:
resyncPeriod 300000000000 is smaller than resyncCheckPeriod 36000000000000 and the informer has already started. Changing it to 36000000000000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is just generally broken. Without the controllers created the informer events won't be set up and the controllers won't properly resync things on startup. This is likely masked by the resync we get when we are promoted to leader, but generally informers should not be started until we're done setting up events.
@n3wscott @vagababov What was the motivation for this change? What will rolling it back in the release branch break?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grantr we should probably make sure that we have test coverage of the scenario where you folks got broken so that we don't make a similar regression in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyone working on fixing this or should I try?
@grantr
Adding an easy entry method next to sharedmain to allow for utilities to leverage injection without being a controller.
Example usage in chaos duck.